<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-show</title>
  <script src="../../js/vue.js"></script>
  <style>
    #pop {
      position: fixed;
      width: 350px;
      height: 100px;
      background-color: lightblue;
      top: 50%;
      left: 50%;
      margin-left: -175px;
      margin-top: -50px;
      padding: 10px;
    }

    #pop>span {
      float: right;
      cursor: pointer;
    }

    #pop>span:hover {
      font-weight: bold;
    }
  </style>
</head>

<body>
  <div id="app">
    <button @click="open">show page</button>
    <div id="pop" v-show="show">
      <span @click="show=false">×</span>
      <p>hello world</p>
    </div>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data: {
        show: false
      },
      methods: {
        open() {
          this.show = true
        }
      }
    })
    console.log(vm)
  </script>
</body>

</html>